<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="{{csrf_token()}}" >
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="{{asset('css/app.css')}}">
    <style>
    body{
        background:#fff;
    }
        .list-group{  
            overflow-y: auto; 
            height:300px;
        }
        ::-webkit-scrollbar
{
  width: 6px;  /* for vertical scrollbars */
  height: 12px; /* for horizontal scrollbars */
}

::-webkit-scrollbar-track
{
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb
{
  background: rgba(0, 0, 0, 0.5);
}
    </style>
</head>
<body>
    <div class="container" id="app">
    <nav class="navbar  navbar-expand-lg navbar-dark bg-primary">
       <a class="navbar-brand" href="#">chat</a>  
            <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
                </li> 
            </ul>

             <ul class="navbar-nav"> 
               <li class="nav-item active ml-auto">
                    <a class="nav-link" href="#">Hello ,<span class="">({{auth()->user()->name}})</span></a>
                  </li> 
            </ul> 
    </nav>
        <div class="row p-4">
        <div class=" col-lg-5 mx-auto" style="height:100%;">
        
                <li class="list-group-item active">Chart Room <span class="badge badge-pill badge-info float-right">@{{ numberOfUsers }}</span></li>
                <div class="badge badge-pill badge-primary">@{{ typing }}</div>
            <ul class="list-group" v-chat-scroll >
                <message
                          v-for='message,index in chat.message' 
                          :color=chat.color[index] 
                          :key = 'message.index'
                          :user = chat.user[index]
                          :time = chat.times[index]
                >
                @{{message}}
                </message> 
            </ul>
            <input type="text" class="form-control" v-model="message" @keyup.enter="send()">
        </div>
        </div>
    </div>
</body>
<script src="{{asset('js/app.js')}}"></script>
</html>
